﻿using EkStudio.com.bean.xml.reflection;
using EkStudio.com.bean.xml.RootInterface;
using EkStudio.com.bean.xml.RootInterface.QuerySource;
using System;
using System.Collections.Generic;

namespace EkStudio.com.bean.xml.BillModule
{
    public class BillQuerySourceRoot:BillObjectInterface
    {
        private List<BillQuerySchemeItem> item;
        [XmlElement]
        public List<BillQuerySchemeItem> Item
        {
            get
            {
                return item;
            }

            set
            {
                item = value;
            }
        }
        [XmlTransient]
        public object ParentBean
        {
            get
            {
                return null;
            }

            set
            {
                
            }
        }

        public BillQuerySchemeItem getSchemeByKey(String key)
        {
            BillQuerySchemeItem cheme = null;
            if (item != null && item.Count > 0)
            {
                for (int i = 0; i < item.Count; i++)
                {
                    if (item[i].Key == key)
                    {
                        cheme = item[i];
                        break;
                    }
                }
            }
            return cheme;
        }

        public object Clone()
        {
            throw new NotImplementedException("查询界面方案不支持复制");
        }
    }
}
